package com.acme.bankapp.domain.account;

import com.acme.bankapp.domain.bank.BankException;

@SuppressWarnings("serial")
public class NotEnoughFundsException extends BankException {

	private static final String ERR_NOT_ENOUGH_FUNDS = "requested to withdraw %.2f when maximum amount is %.2f";

	public NotEnoughFundsException(double requestedAmount, double maximumAmount) {
		super(String.format(ERR_NOT_ENOUGH_FUNDS, requestedAmount, maximumAmount));
	}

	public NotEnoughFundsException() {
	}

	public NotEnoughFundsException(String message, Throwable cause) {
		super(message, cause);
	}

	public NotEnoughFundsException(String message) {
		super(message);
	}

	public NotEnoughFundsException(Throwable cause) {
		super(cause);
	}
}
